home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / notebook / ihave < prev    next >
Text File  |  1989-06-27  |  7KB  |  350 lines

  1. .TL
  2. Setting Up Netnews Feeds Using the Ihave/sendme Protocol
  3. .AU
  4. Geoff Collyer
  5. .AI
  6. Department of Statistics
  7. University of Toronto
  8. .SH
  9. Introduction
  10. .PP
  11. The ihave/sendme protocol is a means of conserving network bandwidth
  12. at the expense of some real-time delays in getting netnews.
  13. It pre-dates the NetNews Transfer Protocol (NNTP)
  14. for the TCP/IP protocol stack by several years and attempts much
  15. the same optimisation,
  16. but ihave/sendme is batched,
  17. unlike NNTP.
  18. .PP
  19. Ihave/sendme
  20. is sketched in extremely vague terms in
  21. ARPA Internet RFC 1036 (nee 850),
  22. but the description therein is so lofty as
  23. to be useless as a protocol specification.
  24. .SH
  25. Into the Breach
  26. .PP
  27. The ihave/sendme strategy is for a site which has just received a new
  28. netnews article to send an
  29. .I ihave
  30. netnews control message
  31. containing the Message-ID of the new article to each
  32. of its ihave/sendme
  33. neighbours;
  34. the neighbour consults its netnews
  35. .I history
  36. file and if it has not seen the article,
  37. sends back a
  38. .I sendme
  39. control message containing the original Message-ID;
  40. upon receipt of the
  41. .I sendme ,
  42. the first site will transmit the article via normal channels
  43. to the requesting neighbour.
  44. .PP
  45. Due to the high volume of netnews,
  46. sending individual articles is always a performance disaster
  47. (see B News,
  48. NNTP and unbatched ihave/sendme),
  49. so the golden rule of netnews is
  50. ``Thou shalt batch thine articles.''.
  51. This makes the above sketch a little slower and more complicated:
  52. now individual articles are not sent,
  53. but batches of
  54. .I ihave ,
  55. .I sendme ,
  56. and
  57. netnews messages are transmitted,
  58. incurring further delay since netnews batchers are usually
  59. run only once per hour,
  60. say.
  61. .PP
  62. To permit
  63. .I sys
  64. file entries to distinguish
  65. .I ihave s
  66. from
  67. .I sendme s
  68. from
  69. ordinary netnews traffic,
  70. two distributions have been usurped for use by ihave/sendme links:
  71. .I ihave
  72. and
  73. .I sendme .
  74. When
  75. .I relaynews
  76. is processing a control message of the form
  77. .DS
  78. Control: keyword system
  79. .DE
  80. where
  81. .I keyword
  82. may be
  83. .I ihave
  84. or
  85. .I sendme ,
  86. .I relaynews
  87. generates a reply
  88. by finding the
  89. .I sys
  90. file line that will match a newsgroup of
  91. .B to. system
  92. and a distribution of
  93. .B ihave
  94. (or
  95. .B sendme
  96. as appropriate),
  97. and sending its reply
  98. (a
  99. .I sendme
  100. control in the case of
  101. .I ihave,
  102. or ordinary articles in the case of
  103. .I sendme )
  104. to the matched channel.
  105. .PP
  106. We will now walk through an example ihave/sendme set up between
  107. two C news sites
  108. (\c
  109. .I utzoo
  110. and
  111. .I utstat ),
  112. with reference to the following
  113. .I sys
  114. file fragments and flow diagram.
  115. .br
  116. .ne 2i
  117. .SH
  118. utzoo's sys file
  119. .LP
  120. .DS L
  121. .ft B
  122. # for testing ihave/sendme control messages: an ihave/sendme link with utstat.
  123. # batcher turns batch file -> giant ihave control message & posts to to.utstat 
  124. #1)
  125. utstat:rec.music.synth/all,!sendme,!ihave:I:utstat.ihave/togo
  126. # sends ihave & sendme messages via normal batching (or uux) (#2, #4)
  127. utstat-ctl:to.utstat/all,!sendme,!ihave:f:utstat/togo
  128. # batcher turns batch file -> giant sendme control message & posts to to.utstat
  129. (#3)
  130. utstat-send-ids:to.utstat/ihave:I:utstat.sendme/togo
  131. # final sending of the articles themselves (#5) (optional; can share with #2 & 
  132. 4)
  133. utstat-real:to.utstat/sendme:f:utstat/togo
  134. .ft R
  135. .DE
  136. .br
  137. .ne 2i
  138. .SH
  139. utstat's sys file
  140. .LP
  141. .DS L
  142. .ft B
  143. # for testing ihave/sendme control messages: an ihave/sendme link with utzoo.
  144. # batcher turns batch file -> giant ihave control message & posts to to.utzoo (
  145. 1)
  146. utzoo:rec.music.synth/all,!sendme,!ihave:I:utzoo.ihave/togo
  147. # sends ihave & sendme messages via normal batching (or uux) (#2, #4)
  148. utzoo-ctl:to.utzoo/all,!sendme,!ihave:f:utzoo/togo
  149. # batcher turns batch file -> giant sendme control message & posts to to.utzoo 
  150. #3)
  151. utzoo-send-ids:to.utzoo/ihave:I:utzoo.sendme/togo
  152. # final sending of the articles themselves (#5) (optional; can share with #2 & 
  153. 4)
  154. utzoo-real:to.utzoo/sendme:f:utzoo/togo
  155. .ft R
  156. .DE
  157. .so ihave.pic
  158. .SH
  159. An Example
  160. .PP
  161. A new article arrives on
  162. .I utzoo
  163. in newsgroup
  164. .I rec.music.synth
  165. and is matched by
  166. .I sys
  167. file line
  168. .B "#1 on utzoo" ,
  169. which writes the Message-ID of the article
  170. onto a batch file
  171. (\c
  172. .I $NEWSARTS/out.going/utstat.ihave/togo ).
  173. There are some subtleties here:
  174. it would be essential to add
  175. .B ,!to
  176. to #1's subscription list
  177. if that list contained
  178. .B all
  179. or
  180. .B to
  181. to prevent leaking messages intended for the other
  182. .I sys
  183. entries out #1;
  184. and
  185. it is always worthwhile to prevent leaking local
  186. newsgroups out one's full feeds,
  187. so if #1's subscription list contained
  188. .B all
  189. one would want to add something like
  190. .B ,!general
  191. or
  192. .B ,!utstat .
  193. Some time later,
  194. the batcher runs on #1's batch file.
  195. .PP
  196. The batcher on
  197. .I utzoo
  198. prepares
  199. a batch of Message-IDs as an
  200. .I ihave
  201. control message to
  202. .I utstat
  203. and submits it to
  204. .I "inews -h" ,
  205. which will match
  206. .I sys
  207. file line
  208. .B "#2 on utzoo" ,
  209. which will typically write the file name of the
  210. control message
  211. (in the
  212. .I control
  213. pseudo-newsgroup)
  214. on the usual
  215. .I utstat
  216. batch file
  217. (\c
  218. .I $NEWSARTS/out.going/utstat/togo ).
  219. (For greater speed,
  220. one can have the #2
  221. .I sys
  222. file line simply execute
  223. .I uux (1)
  224. or
  225. .I mail (1)
  226. but this can result is a lot of short batches being sent,
  227. which will increase
  228. .I rnews
  229. processing overhead on
  230. .I utstat .)
  231. .PP
  232. Some time later,
  233. the batcher will run on
  234. .I utzoo
  235. on the usual
  236. .I utstat
  237. batch file
  238. and will produce batches,
  239. including the
  240. .I ihave
  241. control message,
  242. and transmit them to
  243. .I utstat
  244. by means specified in
  245. .I $NEWSCTL/batchparms .
  246. .PP
  247. When the
  248. .I ihave
  249. control message arrives on
  250. .I utstat ,
  251. it will match
  252. .I sys
  253. file line
  254. .B "#3 on utstat"
  255. and have its Message-ID
  256. written on the
  257. .I utzoo
  258. .I sendme
  259. batch file
  260. (\c
  261. .I $NEWSARTS/out.going/utzoo.sendme/togo ).
  262. .PP
  263. Some time later,
  264. the batcher will run on
  265. .I utstat
  266. on that batch file,
  267. which will produce a
  268. .I sendme
  269. control message
  270. and submit it to
  271. .I "inews -h" ,
  272. which will match
  273. .I sys
  274. file line
  275. .B "#4 on utstat" ,
  276. which will write the name of the
  277. .I sendme
  278. control message in the
  279. .I control
  280. pseudo-newsgroup on
  281. the usual
  282. .I utzoo
  283. batch file
  284. (\c
  285. .I $NEWSARTS/out.going/utzoo/togo)
  286. .PP
  287. Some time later,
  288. the batcher will run on
  289. .I utstat
  290. on the usual
  291. .I utzoo
  292. batch file,
  293. and will produce batches including
  294. the
  295. .I sendme
  296. and send them to
  297. .I utzoo
  298. by means specified in
  299. .I $NEWSCTL/batchparms .
  300. .PP
  301. When the
  302. .I sendme
  303. control message arrives on
  304. .I utzoo ,
  305. it is matched by
  306. .I sys
  307. file line
  308. .B "#5 on utzoo" ,
  309. which writes the file names of the articles
  310. named by Message-ID in
  311. the
  312. .I sendme
  313. control message
  314. on the usual
  315. .I utstat
  316. batch file.
  317. .PP
  318. Some time later,
  319. the batcher on
  320. .I utzoo
  321. will run and produce batches,
  322. including the articles requested by the
  323. .I sendme ,
  324. and will send them to
  325. .I utstat
  326. by means specified in
  327. .I $NEWSCTL/batchparms .
  328. .SH
  329. Comparison with B News
  330. .PP
  331. There is a lot of activity involved in ihave/sendme,
  332. and there are at least five distinct channels
  333. and three transactions needed to send a batch of articles.
  334. B news ``simplifies'' the
  335. .I sys
  336. file by requiring certain
  337. .I sys
  338. file options (sic)
  339. to be set to fixed values,
  340. and
  341. by overloading madly.
  342. The resulting
  343. .I sys
  344. file
  345. .I is
  346. shorter,
  347. but it is also much more difficult to decypher,
  348. and if you should want to specify non-default options,
  349. you are out of luck.
  350.